// STT组件样式
.stt-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background: #f5f5f5;
  z-index: 1000;
  overflow-y: auto;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.stt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  background: #fff;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
  
  .stt-title {
    font-size: 20px;
    font-weight: bold;
    color: #333;
  }
  
  .close-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #ff4757;
    color: white;
    border: none;
    font-size: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    
    &:hover {
      background: #ff3838;
    }
  }
}

.error-panel {
  margin: 20px;
  padding: 15px;
  background: #ffe6e6;
  border: 1px solid #ffcccc;
  border-radius: 8px;
  color: #d63031;
  font-weight: 500;
}

.control-panel {
  margin: 20px;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.status-bar {
  display: flex;
  align-items: center;
  margin-bottom: 20px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
  
  .status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 10px;
    
    &.status-disconnected {
      background: #6c757d;
    }
    
    &.status-connecting {
      background: #ffc107;
      animation: pulse 1.5s infinite;
    }
    
    &.status-connected {
      background: #28a745;
    }
    
    &.status-recording {
      background: #dc3545;
      animation: pulse 1s infinite;
    }
  }
  
  .status-text {
    font-weight: 500;
    color: #495057;
  }
}

@keyframes pulse {
  0% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.5;
    transform: scale(1.2);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.button-container {
  display: flex;
  gap: 10px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

.btn {
  padding: 12px 20px;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  min-width: 120px;
  
  &.btn-primary {
    background: #007bff;
    color: white;
    
    &:hover:not(.btn-disabled) {
      background: #0056b3;
      transform: translateY(-1px);
    }
  }
  
  &.btn-danger {
    background: #dc3545;
    color: white;
    
    &:hover:not(.btn-disabled) {
      background: #c82333;
      transform: translateY(-1px);
    }
  }
  
  &.btn-small {
    padding: 8px 16px;
    font-size: 12px;
    min-width: auto;
  }
  
  &.btn-disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
  }
}

.session-info {
  display: flex;
  flex-direction: column;
  gap: 10px;
  
  .info-item {
    display: flex;
    align-items: center;
    font-size: 14px;
    
    .session-id {
      font-family: monospace;
      background: #e9ecef;
      padding: 2px 6px;
      border-radius: 4px;
      margin-left: 5px;
    }
  }
}

.results-panel {
  margin: 20px;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  
  .panel-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 15px;
    display: block;
  }
}

.interim-result {
  margin-bottom: 20px;
  padding: 15px;
  background: #fff3cd;
  border: 1px solid #ffeaa7;
  border-radius: 8px;
  
  .result-label {
    font-size: 12px;
    color: #856404;
    font-weight: 500;
    display: block;
    margin-bottom: 5px;
  }
  
  .interim-text {
    color: #856404;
    font-style: italic;
    min-height: 20px;
    display: block;
  }
}

.results-list {
  max-height: 300px;
  overflow-y: auto;
  
  .result-item {
    display: flex;
    margin-bottom: 10px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #28a745;
    
    .result-time {
      color: #6c757d;
      font-size: 12px;
      margin-right: 10px;
      min-width: 80px;
      font-family: monospace;
    }
    
    .result-text {
      color: #333;
      flex: 1;
    }
  }
}

.logs-panel {
  margin: 20px;
  padding: 20px;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
  
  .logs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    
    .panel-title {
      font-size: 16px;
      font-weight: bold;
      color: #333;
    }
  }
  
  .logs-content {
    max-height: 200px;
    overflow-y: auto;
    background: #f8f9fa;
    border-radius: 6px;
    padding: 10px;
    
    .log-entry {
      display: flex;
      margin-bottom: 5px;
      font-size: 12px;
      
      .log-time {
        color: #6c757d;
        margin-right: 10px;
        min-width: 80px;
        font-family: monospace;
      }
      
      .log-message {
        color: #495057;
        flex: 1;
      }
    }
  }
}

// 响应式设计
@media (max-width: 768px) {
  .button-container {
    flex-direction: column;
    
    .btn {
      width: 100%;
    }
  }
  
  .session-info {
    .info-item {
      flex-direction: column;
      align-items: flex-start;
      
      .session-id {
        margin-left: 0;
        margin-top: 5px;
      }
    }
  }
  
  .result-item {
    flex-direction: column;
    
    .result-time {
      margin-bottom: 5px;
    }
  }
  
  .logs-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
}